The present invention generally relates to systems and methods for retrieving data from sensors. More specifically, the invention relates to systems and methods for the selective or time constrained collection of data from sensors.
Sensors are used in a large variety of systems and for a large variety of purposes, generally, to provide an indication of the current state or value of a given parameter. Accordingly, there are a variety of types of sensors, for sensing different types of parameters. For example, a sensor may sense temperature, pressure, force, voltage or current level, sound level, humidity, position, or movement.
In a typical application, a sensor is used to detect a state of a multi-state device or may be used to provide a reading of a quantifiable value. For example, in a car alarm system a sensor for the driver""s door may have two states: open and closed. The corresponding driver""s door sensor may be configured to detect whether the door is open or closed and provide a signal to the alarm system to sound an alarm when the door is opened and the alarm system is enabled. In another situation a temperature sensor may read the temperature of a device or a fluid and provide a signal to an analog or digital display indicative of the value of the temperature.
A sensor may also be part of a feedback (or closed-loop) system, wherein the indication provided by the sensor serves as an input to a system that is configured to provide a countervailing response. For example, in an automobile cooling system, if a sensor reads a temperature that is above a maximum threshold, the sensor outputs a parameter value indicative of the temperature (i.e., parameter) that causes a controller to start a cooling radiator fan. The fan stays on until the sensor outputs a temperature parameter value to the controller that is below the threshold value.
In such systems, sensors are part of a larger computer controlled system, wherein sensor outputs serve as inputs to one or more controllers in the computer controlled system. The values of such inputs cause certain corresponding outputs of the controllers, to which other components in the system are responsive. Additionally, like the other components, the sensors may be driven by controller outputs. For example, one or more sensors may be queried periodically by control logic as part of a set of tasks that need to be performed within a given period of time.
However, typically, when there are multiple sensors to be queried within a very small time frame, e.g., a fraction of a second, it may be difficult or even impossible to consistently and reliably obtain an accurate sensor parameter value for each parameter sought to be sensed. This reliance on inaccurate parameter values approximations can lead to system errors or even failures.
The present invention is a system and method for time constrained retrieval of sensor data from a plurality of sensors. A set of sensors is coupled to a device having a variety of variable parameters to be sensed at intervals within a given timeframe. Each sensor may be configured to sense one parameter and, therefore, has its own address. Sensing a parameter involves a sensor obtaining and providing a corresponding parameter value, which may be done in response to a request issued by a sensor monitor system. When the intervals are relatively short, it is difficult to obtain and provide a parameter value for each parameter of each device, particularly if there are other tasks to be performed within the interval.
If, among these parameters, some parameters (and their parameter values) are relatively stable within the intervals, i.e., a parameter value has a slow rate of change, the sensor monitor system may selectively request parameter values from only a subset of the sensors at one or more intervals, in accordance with the present invention. However, preferably, a parameter value is obtained for each parameter at least once within the timeframe. In such a case, a current set of parameter values includes the most recently obtained parameter values for, preferably, each parameter, regardless of the interval from which each parameter value was obtained. This current set of parameter values may be made available to an application (or host) system that, in most cases, includes the devices being sensed.
The sensor monitor system includes a sensor manager that includes logic for requesting parameter values (i.e., data) from each sensor. This logic may be implemented in hardware, software, firmware or some combination thereof and may vary depending on the number and types of devices and corresponding parameters to be sensed. A timeframe comprised of a plurality of intervals is defined as a function of the application system""s needs to obtain parameter values at the intervals, the timing of those needs, and the physical or systemic limitations to meeting those needs. Selectively, at least some of the parameters are sensed during each interval. In a sense, the sensor manager can be thought of as providing a scheduling and management function over the sensors for obtaining parameter values. That is, the sensor manager may issue requests to sensors to return parameter values at certain intervals. In some cases, the sensor manager will be configured to implement logic that returns parameter values within a processing loop dictated to the sensor monitor system by an application (or host) system.
As an example, an application system may require a value for each parameter of each device at an interval that is a fraction of a second. However, it may not be possible, or practical, to have all parameters sensed and parameter values available within such tight time constraints. As a result, the sensor manager efficiently orchestrates the gathering of parameter values from the sensors within the time constraints. If a subset of these parameters are not capable of or likely to significantly change within the interval, the control logic may be implemented to selectively abstain from obtaining parameter values for the entire subset during each interval. For example, if there are thirty devices each having the same three parameters to be sensed, but one of these parameters has a rate of change that is slow relative to the interval, than the sensor manager will be configured to obtain parameter values for only some of those slow changing parameters during each interval. However, preferably, each of those slow changing parameters will be sensed at least once during each timeframe.
Ultimately, the application system may require a complete current set of parameter values at each interval. In such a case, the sensor monitor system provides a current set of parameter values that includes the latest sensed parameter value of each parameter, even though some of these parameter values may have been obtained in previous intervals. Because only parameter values for slow changing parameters are taken from previous intervals, all parameter values in the current set of parameter values will be accurate within acceptable limits. This approach may be used in cases when all of the devices and their parameters are the same, or where there are a variety of devices having different types of parameters to be sensed. In either case, the present invention may distribute the sensing of slow changing parameter values over several intervals.
Additionally, the sensor monitor system may include logic that predicts whether certain parameters can be sensed less frequently than every interval or every timeframe. Such predictions may be based on historical parameter value data, wherein the sensor monitor system may be configured to store such historical data. Also, such predictions may be based on a relationship between various system parameters or events. For example, in an automobile, voltage of an electronics battery may be sensed every 100 ms interval when the car is running, but when the car is not running, voltage may be sensed every second, i.e., under conditions where the rate of change of the battery is slower than during normal operations.